#ifndef AUXF_H
#define AUXF_H

#include <string>
#include <iostream>
#include <vector>
#include <fstream>
#include <stdlib.h>

using namespace std;

class Auxf{
	public:
		
		string nodes_file,nets_file,wts_file,pl_file,scl_file,shapes_file,route_file;
		bool parse(char *dir_name, string file_name){
			string tmp;
			tmp = dir_name;
			tmp += "/";
			tmp += file_name;
			ifstream inp(file_name.c_str());
			if(!inp.is_open()){
				cerr<<"Can not open "<<file_name<<endl;
				exit(1);
			}
			inp>>tmp;
			inp>>tmp;
			tmp = dir_name;
			tmp += "/";
			inp>>nodes_file;
			nodes_file = tmp + nodes_file;
			inp>>nets_file;
			nets_file = tmp + nets_file;
			inp>>wts_file;
			wts_file = tmp + wts_file;
			inp>>pl_file;
			pl_file = tmp + pl_file;
			inp>>scl_file;
			scl_file = tmp + scl_file;
			inp>>shapes_file;
			shapes_file = tmp + shapes_file;
			inp>>route_file;
			route_file = tmp + route_file;	
			inp.close();
			
			return true;
		}		
};
	
#endif

